package com.maigu.service;

import com.maigu.dataobject.ProductInfo;
import com.maigu.dto.CartDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface ProductService {
    ProductInfo finOne(String productId);
    List<ProductInfo> findUpAll();
    Page<ProductInfo> findAll(Pageable pageable);
    ProductInfo save(ProductInfo productInfo);

    //加库存
   void increaseStock(List<CartDTO> cartDTOList);
   //减库存
    void decreaseStock(List<CartDTO> cartDTOList);
    //上架

   ProductInfo onSale(String productId);
    //下架
    ProductInfo offSale(String productId);

}
